package cn.amarone.wineblog.models.sys.controller;

import cn.amarone.wineblog.common.appointment.Result;
import cn.amarone.wineblog.models.sys.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 前端控制器
 *
 * @author amarone
 * @since 2020-09-08
 */
@RestController
@RequestMapping("/sys/user")
public class UserController {

  @Autowired private IUserService userService;

  @GetMapping("/all")
  public Result getAllUser() {
    return Result.success(userService.list());
  }
}
